<?php
	session_start();
	require '../data/Banque.php';
	
	$login = $_POST['username'];
	$password = $_POST['password'];
	$banque = Banque::getBanqueByLoginAndPassword($login, $password);
	
	if($banque != null){
		$_SESSION['banque'] = serialize($banque);
		header("Location:../consult_dossier.php");
	} else {
		header("Location:../index.php?login_error");
	}
?>